<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all" />
</head>

<body>
    <div class="layui-fluid">
        <form class="layui-form">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body" pad15="">
                            <div class="layui-form" wid100="" lay-filter="">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">联赛</label>
                                    <div class="layui-input-block">
                                        <div class="layui-form-mid ">欧洲杯</div>
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">分组</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="group_code" value="" class="layui-input" lay-verify="">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">赛事球队</label>
                                    <div class="layui-input-block">
                                        <select name="team" lay-search="" lay-verify="required">
                                            <option value="">请选择</option>
                                            <?php
                                            for($i=0;$i<count($match_list); $i++) {
                                                echo "<option value='".$match_list[$i]['team_id']."|".$match_list[$i]['team_name']."|".$match_list[$i]['team_logo']."'>".$match_list[$i]['team_name']."</option>";
                                            }
                                            ?>
                                        </select>
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">场次</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="match_times" value="" placeholder="场次数"
                                            class="layui-input" lay-verify="required|number">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">胜</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="win" value="" class="layui-input" lay-verify="">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">负</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="lost" value="" class="layui-input" lay-verify="">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">平</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="draw" value="" class="layui-input" lay-verify="">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">进球数</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="goals" value="" class="layui-input" lay-verify="">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">失球数</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="goals_conceded" value="" class="layui-input"
                                            lay-verify="">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">净胜球</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="goal_difference" value="" class="layui-input"
                                            lay-verify="">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">积分</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="score" value="" class="layui-input" lay-verify="">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-submit=""
                                            lay-filter="worldcup-point-add">确认</button>
                                        <button class="layui-btn layui-btn-primary layuiadmin-btn-push"
                                            data-type="cancel">取消</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>

    <script src="/layuiadmin/layui/layui.js"></script>
    <script>
        layui.config({
            base: "/layuiadmin/"
            , version: "{:config('other.ui_version')}"
        }).extend({
            index: "lib/index", //主入口模块
        }).use(["index", "worldcup", "form", "admin"], function () {
            var $ = layui.$;
            var form = layui.form;
            var admin = layui.admin;
            //事件
            var active = {
                cancel: function () {
                    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                    parent.layer.close(index); //再执行关闭
                },
            };

            $(".layui-btn.layuiadmin-btn-push").on("click", function () {
                var type = $(this).data("type");
                active[type] ? active[type].call(this) : "";
            });

        });
    </script>
</body>

</html>